﻿<%@ Page Language="C#" MasterPageFile="~/FrameMasterPage.master" AutoEventWireup="true" CodeFile="EmployeeEquipment.aspx.cs" Inherits="EmployeeEquipment" Title="Untitled Page" %>

<asp:Content ID="Content1" ContentPlaceHolderID="m_contentBody" Runat="Server">



<asp:Panel runat="server" ID="pnlBody">
  <body>

   <table  class="GridItem" cellspacing="2" cellpadding="2" style="width:450px;height:350px">
    
        
         <tr>
              <td style="width:400px" colspan ="2" ><strong> <asp:Label ID="lblSupplierContact" runat="server" text="responsible for equipment" ></asp:Label></strong> </td>
             
         </tr>
         
         <tr style="height:auto">
         <td colspan ="2" style="width:auto">
<div style="height:120px; width:auto; overflow:auto">
         <asp:GridView ID="grdEmployeeEquipment" runat="server" AllowPaging="True" 
                    AllowSorting="True" AutoGenerateColumns="False" BorderStyle="None" 
                    CssClass="GridItem" DataKeyNames="CODENUMBER" DataSourceID="dsEmployeeEquipment" 
                    PageSize="15" RowHeaderColumn="EquipmentId" >
                    <SelectedRowStyle BackColor="Yellow" />
                    <HeaderStyle BorderStyle="None" CssClass="GridViewHeader" Height="20px" 
                        Width="1050px" />
                    <Columns>
                        <asp:CommandField DeleteText="" InsertText="" ShowEditButton="False" 
                            ShowSelectButton="True">
                            <ItemStyle Width="650px" />
                        </asp:CommandField>
                        
                        <%--<asp:ButtonField CommandName="Delete" Text="Delete">
                            <ItemStyle Width="20px" />
                        </asp:ButtonField>--%>
                        
                        <asp:BoundField DataField="CODENUMBER" HeaderText="Nº" ReadOnly="True">
                            <ItemStyle Width="650px" />
                        </asp:BoundField>
                        <asp:TemplateField HeaderText="Model">
                            <ItemTemplate>
                                <%# Eval("Model") %>
                            </ItemTemplate>
                            <ItemStyle Width="650px" />
                          <%--  <EditItemTemplate>
                                &nbsp;<asp:TextBox ID="textBox0" runat="server" Text='<%# Bind("Model") %>' 
                                     Width="95%"></asp:TextBox>
                            </EditItemTemplate>--%>
                        </asp:TemplateField>
                        
                         <asp:TemplateField HeaderText="Type">
                            <ItemTemplate>
                                <%# Eval("TypeEquipment") %>
                            </ItemTemplate>
                            <ItemStyle Width="650px" />
                            
                            <%--<EditItemTemplate>
                                &nbsp;<asp:TextBox ID="textBox1" runat="server" Text='<%# Bind("TypeEquipment") %>' 
                                     Width="95%"></asp:TextBox>
                            </EditItemTemplate>--%>
                            
                        </asp:TemplateField>
                         <asp:TemplateField HeaderText="System">
                            <ItemTemplate>
                                <%# Eval("System")%>
                            </ItemTemplate>
                            <ItemStyle Width="650px" />
                           <%-- <EditItemTemplate>
                                &nbsp;<asp:TextBox ID="textBox2" runat="server" Text='<%# Bind("System") %>' 
                                     Width="95%"></asp:TextBox>
                            </EditItemTemplate>--%>
                        </asp:TemplateField>
                         <asp:TemplateField HeaderText="Date purchase">
                            <ItemTemplate>
                                <%# Eval("PurchaseDate") %>
                            </ItemTemplate>
                            <ItemStyle Width="650px" />
                          
                        </asp:TemplateField>
                        
                        <asp:TemplateField HeaderText="Warranty">
                        <ItemTemplate>
                                <%# Eval("IsWarranty") %>
                            </ItemTemplate>
                           <ItemStyle Width="650px" />
                        </asp:TemplateField>
                        
                    </Columns>
                    <PagerStyle HorizontalAlign="Center" VerticalAlign="Middle" />
                    <EditRowStyle BackColor="LightGray" />
                    <RowStyle CssClass="AlternativeRowStyle" />
                    <AlternatingRowStyle BackColor="White" CssClass="AlternativeRowStyle" />
</asp:GridView>
</div>
                 <asp:ObjectDataSource ID="dsEmployeeEquipment" runat="server" 
                          SelectMethod="GetEmployeeEquipmentDisplayedByEmployeeId"  
                    TypeName="DirectServiceSupplier" 
                    
                   >   
                     <SelectParameters>
                         <asp:ControlParameter ControlID="lblEquipmentTypeId" Name="employeeId" 
                             PropertyName="Text" Type="String" />
                     </SelectParameters>
                                      
              </asp:ObjectDataSource>
         </td> 
      </tr>
      <tr style="text-align:center" >
      <td style="text-align:center">
         <strong><asp:Label ID="lblCodeNumber" runat="server" Visible ="false" style="COLOR:Black" ></asp:Label>
        </strong>
      </td>
      </tr>
       <tr>
          <td style="height:auto;width:auto" > 
            <asp:Table ID="Table1" runat ="server">
            </asp:Table>
           </td>
       </tr>
        
      <tr>
         <td style="height: 28px"></td>
         <td style="height: 28px">
         <asp:Label ID="lblEquipmentTypeId" runat="server" Visible="False" ></asp:Label>
         <asp:TextBox ID="txtHiddenTypeId" runat="server" Visible="False"></asp:TextBox>
        </td>    
      </tr>
      
      <tr>
         <td style="height: 28px"></td>
         <td style="height: 28px">
         <asp:Label ID="lblEquipmentType" runat="server"  Visible ="false"></asp:Label></td>    
      </tr>
      
     
      
     
      
     
          
  </table>

</body>
              
</asp:Panel>


</asp:Content>

